package org.fastframework.test.mapper;

import org.fastframework.boot.data.jdbc.mysql.annotation.Insert;
import org.fastframework.boot.data.jdbc.mysql.annotation.Mapper;
import org.fastframework.boot.data.jdbc.mysql.annotation.Param;
import org.fastframework.boot.data.jdbc.mysql.annotation.Select;
import org.fastframework.test.entity.User;

@Mapper
public interface UserMapper {
    @Insert("insert into user(username,password) values (#{userName},#{password})")
    int insertUser(@Param("userName") String userName, @Param("password") String password);

    @Select("select * from user where username=#{userName}")
    User selectUser(@Param("userName") String userName);
}
